
import ECharts from 'vue-echarts'
import { use } from 'echarts/core'

// 手动引入 ECharts 各模块来减小打包体积
import {
    TitleComponent,
    PolarComponent,
    TooltipComponent,
    LegendComponent,
    GridComponent
} from 'echarts/components';
import {
    LineChart,
    BarChart
} from 'echarts/charts';
import {
    CanvasRenderer
} from 'echarts/renderers';

use([
  TitleComponent,
  PolarComponent,
  TooltipComponent,
  LegendComponent,
  GridComponent,
  LineChart,
  BarChart,
  CanvasRenderer
]);

// 全局注册组件（也可以使用局部注册）
Vue.component('v-chart', ECharts)
